package com.bdqn.vueboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 车辆
 * @TableName car
 */
@TableName(value ="car")
@Data
public class Car implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 目的地
     */
    private String destination;
    /**
     * 发车时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date departureTime;

    /**
     * 回程时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date flybackTime;

    /**
     * 人数
     */
    private Integer price;

    /**
     * 涨发车辆
     */
    private int vehicle;

    /**
     * 司机性质
     */
    private String driver;

    /**
     * 是否过夜
     */
    private Integer overnight;

    /**
     * 申请人
     */
    private String proposer;

    /**
     * 联系人
     */
    private long contacts;

    /**
     * 用车部门
     */
    private Long departmentId;

    /**
     * 发起时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date startingTime;

    /**
     * 状态id
     */
    private Integer staticId;

    /**
     * 司机id
     */
    private Integer driverId;
    /**
     * 手机号
     */
    private Long phone;

    /**
     * 需求说明
     */
    private String requirements;
    /**
     * 回复id
     */
    private Long replyId;
    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private Long creationId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    /**
     * 修改者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateId;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public String getRequirements() {
        return requirements;
    }

    public void setRequirements(String requirements) {
        this.requirements = requirements;
    }

    public Long getCreationId() {
        return creationId;
    }

    public void setCreationId(Long creationId) {
        this.creationId = creationId;
    }

    public LocalDateTime getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(LocalDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        this.updateId = updateId;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

}
